package(default_visibility = ["//visibility:public"])

load(
    "//tools:defaults.bzl",
    "markdown_to_html",
    "ng_module",
    "ng_test_library",
    "ng_web_test_suite",
    "sass_binary",
    "sass_library",
)

ng_module(
    name = "snack-bar",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = [
        ":snack-bar-container.css",
        ":simple-snack-bar.css",
    ] + glob(["**/*.html"]),
    module_name = "@angular/material/snack-bar",
    deps = [
        "//src/cdk/a11y",
        "//src/cdk/bidi",
        "//src/cdk/layout",
        "//src/cdk/overlay",
        "//src/cdk/portal",
        "//src/material/button",
        "//src/material/core",
        "@npm//@angular/animations",
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//rxjs",
    ],
)

sass_library(
    name = "snack_bar_scss_lib",
    srcs = glob(["**/_*.scss"]),
    deps = ["//src/material/core:core_scss_lib"],
)

sass_binary(
    name = "snack_bar_container_scss",
    src = "snack-bar-container.scss",
    deps = ["//src/cdk/a11y:a11y_scss_lib"],
)

sass_binary(
    name = "simple_snack_bar_scss",
    src = "simple-snack-bar.scss",
    deps = ["//src/material/core:core_scss_lib"],
)

ng_test_library(
    name = "unit_test_sources",
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = ["**/*.e2e.spec.ts"],
    ),
    deps = [
        ":snack-bar",
        "//src/cdk/a11y",
        "//src/cdk/overlay",
        "@npm//@angular/common",
        "@npm//@angular/platform-browser",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_test_sources"],
)

markdown_to_html(
    name = "overview",
    srcs = [":snack-bar.md"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)
